package cn.cvs.dao;

import cn.cvs.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface SysUserMapper {
    /**
     * 统计用户数量
     * @return
     */
    int count();

    List<SysUser> list();

    List<SysUser> getUserByRealName(String realName);

    public List<SysUser> getUserListByPojo(SysUser sysUser);

    public List<SysUser> getUserListByMap(Map<String,Object>userMap);

    public List<SysUser>getUserListParams(@Param("realName")String realName,@Param("roleId")int roleId);

    public List<SysUser>getUserListWithRoleName(SysUser sysUser);

    public List<SysUser>getUserListByRoleId(@Param("roleId")Integer roleId);
    public List<SysUser> getUserAndAddressesByUserId(@Param("userId") Integer userId);

    public int add(SysUser user);


    public int modify(SysUser user);


    public int updatePwd(@Param("id") Integer id,@Param("password") String pwd);


    public int deleteUserById(@Param("id") Integer id);

    public List<SysUser> selectList(@Param("realName")String realName,@Param("roleId")Integer roleId);

    public List<SysUser> selectByChoose(@Param("realName")String realName, @Param("roleId")Integer roleId, @Param("account")String account, @Param("createdTime")Date createdTime);

    public List<SysUser> getUserByRoleIdArray(Integer []roleId);

    public List<SysUser> getUserByRoleIdList(List<Integer> roleList);
}
